<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<html>
<head>
<title>用户登录</title>
<link href="<s:url value='/common/css/login.css'/>" rel="stylesheet" type="text/css" />
<script src="<s:url value='/common/lib/jquery/jquery-1.3.2.min.js'/>" type="text/javascript"></script>
<script type="text/javascript">
	$(function() {
		$("#login_userAccount").focus();
		
		$(document).keydown(function (e) {
			if(e.keyCode == 13) {
				if($("#login_userAccount").val() != "" && $("#long_userPassword").val() != "") {
					login();
				}
			}
		});
	});

	function login() {
		$("#loginForm").submit();
	}
	
	function loginRest() {
		$("#login_userAccount").val("");
		$("#long_userPassword").val("");
		return true;
	}
</script>
<style type="text/css">
	.errors {
		background-color:#FFCCCC;
		border:1px solid #CC0000;
		margin-left:2px;
		margin-right:2px;
	}
	.errors li{ 
		list-style: none; 
	}
</style>
</head>
	<body>
		<div id="login">
	     <div id="top">
		      <div id="top_left"><img src="<s:url value='/common/css/images/login_03.gif'/>" /></div>
			  <div id="top_center"></div>
		 </div>
		 <div id="center">
		      <div id="center_left"></div>
			  <div id="center_middle">
			  		<s:if test="hasActionErrors()">
					   			<div class="errors">
					      			<s:actionerror/>
					   			</div>
					</s:if>
					<form name="loginForm" id="loginForm" action="<s:url value='login.action'/>" method="post">
				       <div id="user">账 号
				         <input type="text" name="userAccount" id="login_userAccount"/>
				       </div>
					   <div id="password">密 码
					     <input type="password" name="userPassword" id="long_userPassword"/>
					   </div>
				   </form>
				   <div id="btn"><a href="#" onclick="login()" id="loginBtn">登录</a><a href="#" onclick="loginRest()">清空</a></div>
			  </div>
			  <div id="center_right"></div>		 
		 </div>
		 <div id="down">
		      <div id="down_left">
			      <div id="inf">
                       <span class="inf_text">版本信息</span>
					   <span class="copyright">汽车盘库信息管理系统 2013 v1.0</span>
			      </div>
			  </div>
			  <div id="down_center"></div>		 
		 </div>
	</div>
	</body>
</html>